package cn.edu.scau.cmi.zhaotingjie.chapter04;

public class Yanghui {
	public static void main(String args[]) {
		int [][] arr = new int [10][10];
		for (int i= 0;i<arr.length;i++) {
			arr[i] = new int [i+1];
		}
		
		for (int i = 0;i<arr.length;i++) {
			arr[i][0]=1;
			arr[i][i]=1;
			for (int j =1 ;j < i;j++) {
				arr[i][j]=arr[i-1][j-1]+arr[i-1][j];
			}
		}
		
		for(int i = 0;i<arr.length;i++) {
			for (int j = 0 ;j<arr[i].length;j++)
				System.out.print(arr[i][j]+"\t");
		System.out.println();
		}
	}
}
